﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using TRACv2.Domain.Interfaces.IRepository;
using TRACv2.Domain.Services;

//Author: Morgan William Davis III
//Project: TRAC Ticket Manager v2
//Date: 21 Mar 2014

namespace TRACv2.Domain.Test
{
    [TestClass]
    [ExcludeFromCodeCoverage]
    public class EmployeeServiceTest
    {
        [TestMethod]
        public void GetByCode_NullValueArgument_ShouldWork()
        {
            //Arrange
            String nullString = null;
            var employeeRepo = new Mock<IEmployeeRepository>();
            var service = new EmployeeService(employeeRepo.Object);

            //Act
            service.GetByCode(nullString);

            //Assert
            Assert.IsTrue(true);
        }

        [TestMethod]
        public void GetByID_IntegerOutOfRange_ShouldWork()
        {
            //Arrange
            const int integer = 9999999;
            var employeeRepo = new Mock<IEmployeeRepository>();
            var service = new EmployeeService(employeeRepo.Object);

            //Act
            service.GetByID(integer);

            //Assert
            Assert.IsTrue(true);
        }

        [TestMethod]
        public void GetByLastName_NullValueArgument_ShouldWork()
        {
            //Arrange
            String nullString = null;
            var employeeRepo = new Mock<IEmployeeRepository>();
            var service = new EmployeeService(employeeRepo.Object);

            //Act
            service.GetByLastName(nullString);

            //Assert
            Assert.IsTrue(true);
        }

        [TestMethod]
        public void GetByLastName_EmptyStringArgument_ShouldWork()
        {
            //Arrange
            String emptyString = "";
            var employeeRepo = new Mock<IEmployeeRepository>();
            var service = new EmployeeService(employeeRepo.Object);

            //Act
            service.GetByLastName(emptyString);

            //Assert
            Assert.IsTrue(true);
        }
    }
}
